package weixinkeji.dev.dc.base.scheme.promotions.h;

import cache.service.IMYCache;
import java.util.List;
import weixinkeji.dev.dc.base.scheme.promotions.bean.PromotionDay;
import weixinkeji.dev.dc.base.scheme.promotions.check.PromotionDayCheck;
import sys.wx.ann.hm.H;
import sys.wx.ann.hm.M;
import sys.wx.c.ATR;
import sys.wx.c.components.cv.CV;
import sys.wx.m.db.dao.mysql.Dao;

@H("weixinkeji/dev/dc/base/scheme/promotions/a")
public class PromotionDayHA {

    ATR a;

    public PromotionDayHA(ATR a) {
        this.a = a;
    }

    @M("/add")//通过 weixinkeji/dev/dc/base/scheme/promotions/a/add.imy 访问
    public String add() {
//        PromotionDay u = CV.getObject_Add(PromotionDay.class, a.request, new PromotionDayCheck().doPromotionDay(false));
        List<PromotionDay> list = CV.getObject_Json(PromotionDay.class, "list", a.request, new PromotionDayCheck().doPromotionDay(false));
        if (null == list) {
            a.out_OK_NO(false, "检验不通过！添加失败。");
            return null;
        }
        a.out_OK_NO(Dao.add(list));
        return null;
    }

}
